#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (a = 0; a <= 1; a++)
	{
		for (b = 0; b <= 1; b++)
		{
			for (c = 0; c <= 1; c++)
			{
				for (d = 0; d <= 1; d++)
				{
					if ((a != 1) +( c == 1 )+( d == 1 )+( d != 1) == 3 && (a + b + c + d) == 1)
					{
						printf("a=%d b=%d c=%d d=%d", a, b, c, d);
					}
				}
			}
		}
	}
	return 0;
}